package com.m3958.logcollector.datacommons.exception;

import com.m3958.logcollector.datacommons.util.M3958ValidationErrors;

public class M3958ValidationException extends Exception {
    
    /**
     * 
     */
    private static final long serialVersionUID = 1779040111774912847L;
    
    private M3958ValidationErrors errors = new M3958ValidationErrors();
    
    public M3958ValidationException(String fieldName, String message) {
        super(fieldName + ":" + message);
        errors.putOne(fieldName, message);
    }

    public M3958ValidationErrors getErrors() {
        return errors;
    }

    public void setErrors(M3958ValidationErrors errors) {
        this.errors = errors;
    }
    
}
